import request from '../utils/request.js';

//分页查询员工
export const queryPageEmpApi = (name,gender,begin,end,page,pageSize)=>{
 return request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
}

//新增员工
export const saveEmpApi = (emp)=>{
 return request.post('/emps',emp)
}

//根据id查询员工
export const queryEmpByIdApi = (id)=>{
 return request.get('/emps/'+id)
}

//修改员工
export const updateApi = (emp)=>{
  return request.put('/emps',emp)
 }

 //根据id删除员工
 export const deleteByidsApi = (ids)=>{
  return request.delete(`emps?ids=${ids}`)
 }

 //查询所有员工

 export const queryAllEmpApi = ()=>{
  return request.get('/emps/list');
 }